home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1997 February / Macworld (1997-02).dmg / Updaters / DeBabelizer 1.6x -> 1.6.5 / Important Information / Developer's Toolkit < prev    next >
Text File  |  1996-12-17  |  4KB  |  51 lines

  1. Free for registered DeBabelizer owners:
  2. the Custom Code Module Developer's Toolkit
  3.  
  4. General Description
  5. Custom Code Modules (CCMs) are placed together into the "Custom Code" folder.  On startup, DB (DeBabelizer) finds this folder.  Entries are added to the following DB menus: Edit, Palette, Misc, Open filetypes, Save filetypes.  Each module has a resource which tells DB which menu it goes into.  When the user selects an item from one of these menus that is in a CCM, that module's CODE resource is loaded and called.  The CODE resource is called with a list of parameters:
  6.  
  7. • an opcode which tells the module which function to execute. (defined in process.h).
  8.  
  9. • a pointer to a list of data parameters.  The number of entries in this list depends on the opcode.
  10.  
  11. • a pointer to a list of utility subroutine addresses in the main program which may be called from the module (see sublist.h and sublist_defines.h).  Any subroutine defined in sublist_defines.h may be called as if it were linked in with the module.
  12.  
  13. • a pointer to 32 bytes of storage which can be used by the module to keep things like preferences and settings which must be remembered from call to call.  DB saves these to the DB prefs file when the user quits and restores them when the program is run.  If more storage area is needed, the module should save the data in a resource in DB's prefs file.  There are DB subroutines to call to make this very easy.
  14.  
  15. Basic module types
  16. • Open filetypes:  open and read a specific file format.  Deliver to DB an unpacked image along with a complete description of that image.
  17. • Save filetypes: convert the current DB image to a specific file format.  Takes care of any special processes such as clipping the image to a specific size, converting to grayscale or to a special palette.  Specifies to DB valid bit depths and DB takes care of standard color reduction.
  18. • Edit and palette functions: operates on DB's current image.  Can change the image, the image description (size, etc), and the image palette.
  19.  
  20. Recommended environment: Code Warrior by Metrowerks
  21.  
  22. Sample Projects included
  23. • PROJ bob in: opens BOB type files, which are basic uncompressed 256 colorbitmaps.
  24. • PROJ bob out: saves to BOB filetype.
  25. • PROJ invert colors: inverts the palette.  If it's an RGB picture, then it inverts each pixel.
  26. • PROJ macpaint out: saves to MacPaint filetype.
  27. • PROJ set resolution: changes image resolution. Gives an example of implementing a dialog box in a CCM.
  28.  
  29. Debugging Tool
  30. • CODE zpict info: place this into the Custom Code folder. It will display all the information maintained for the current image.
  31.  
  32. Guidelines
  33. It is important that modules be patterned after the sample projects:
  34. •so that they will have a consistent look and feel to the user,
  35. •so that they maximize the use of the power available in DB, and
  36. •so that DB upgrades will not break them.
  37.  
  38. If there is a function which you need to perform which is not documented in the sample Projects but which you have seen in other DB modules, contact DB Tech Support for help in programming this function.
  39.  
  40. Subroutine Library
  41. The subroutines available to the CCM (via the subroutine list pointer passed in on entry) give the user a lot of powerful built-in capabilities.  See "sublist_defines.h" and "Inside DeBabelizer" for complete descriptions.  They provide support for dialog boxes, file reading and writing, handling of files with multiple pictures, operations on the picture you have created, etc. Whenever possible, use these routines: they will make your code shorter and provide a standardized interface.
  42.  
  43. Costs/Requirements
  44. A license for the Toolkit is FREE.  You are required to register the Toolkit in order to receive Technical Support.  The Developer's Toolkit is available on Equilibrium's BBS:
  45.         BBS Ph. #:   (415) 332-6152
  46.  
  47. and at our Web Site:
  48.         www.equilibrium.com
  49.  
  50. or you may call Equilibrium to request a disk to be mailed to you (note: there will be a minimal charge applied to cover shipping and handling costs):
  51.         Equilibrium Ph. #:   (415) 332-4343